home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c++
- Subject: Re: Visual c++ Win32 problem
- Date: Tue, 23 Jan 1996 16:37:53 +0200
- Organization: Carelcomp Forest
- Message-ID: <3104F2C1.270D@cmt.lpr.mail.carel.fi>
- References: <4dpq0r$d1c@oznet07.ozemail.com.au>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- Michael Pomponio wrote:
- >
- > Subject: Visual c++ Win32 Problems
- > In Visual c++ v1.5 I wrote an application that calls an windows ftp
- > program anf waits until the ftp prgram has finished before continuing. I
- > basialled called the ftp like so;
- >
- > WinExec("ftp", 4);
- > while ( FindWindow(NULL, "ftp") != NULL)
- > {
- > Yeild();
- > }
- > MessageBox("FTP PROGRAM HAS EXITED"):
- >
- > When I try to do the same in Visual c++ v2.0 ( running on Win95) It
- > doesn't work for 2 reasons, (1) Yield() function no longer exists in
- > Win32 and (2) porgrams are executed via a THREAD and a NEW PROCESS (
- > bloody multitasking). Does anybody now how I can do what I did in v1.5 in
- > v2.0/ Becuase I have read every c++ book in any of Sydneys desent book
- > store and they tell nothing about WinExec, createprocess and createthread
- > ( that is relevant)..
- >
-
- Look at the online help for the functions: CreateProcess, OpenProcess and
- GetExitCodeProcess. These should be what you need, and the online help has quite a
- bit of information about how to use them; which is a little too long to be included
- here. Note: these do not work in 16-bit Windows (what you'd program using VC1.5).
-
- HTH,
- AriL
-
- --
- All my opinions are mine and mine alone.
-